#include "Common_funcs.h"

/**
  * @brief  Swap the values of 2 variables using their address
  * @param  UIN16 * a: Address of the first variable
  * @param  UIN16 * b: Address of the second variable
  * @retval None
  */

void Swap16(UIN16 * a, UIN16 * b)
{
	UIN16 temp = ZERO_16;
	temp = *a;
	*a = *b;
	*b = temp;
	return;
}

void SplitDecDigits16(UIN16 Victim, UIN16 * Digits)
{
	UIN16 i = ZERO_16;
	UIN16 Stored_Var;

	while(Victim > ZERO_16)
	{
		Stored_Var = Victim REMAIN_BY 10;

		Victim = Victim DEVIDE_BY 10;

		*(Digits + i) = Stored_Var;

		i++;


	}

	return;
}
